package com.itcam;

/**
 * @author : Cammy.Wu
 * Description : 饿汉式
 */

public class HungryMan {

    // 类加载时就创建，未使用会浪费空间
    private byte[] data1 = new byte[1024 * 1024];
    private byte[] data2 = new byte[1024 * 1024];
    private byte[] data3 = new byte[1024 * 1024];
    private byte[] data4 = new byte[1024 * 1024];

    private HungryMan() {
    }

    private final static HungryMan HUNGRY = new HungryMan();

    public static HungryMan getInstance() {
        return HUNGRY;
    }
}
